package com.example.javanewwork.controller;


import com.example.javanewwork.entity.Repair;
import com.example.javanewwork.entity.Result;
import com.example.javanewwork.service.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/repair")
public class RepairController {


    @Autowired
    private RepairService repairService;

    @PostMapping("/add")
    public Result addrepair(@RequestBody Repair repair){

        repairService.add(repair);

        return Result.success();

    }


}
